<style scoped>
    
</style>

<template>
     <div class="content">
      	<div class="container">
      		<my-loading v-if="state.loading"></my-loading>
            <div v-else>
             
           		{{ movies }}
            </div>
      	</div>
    </div>
</template>

<script>
	import { mapState, mapActions } from 'vuex'
	
	export default {
	  	components: {
	    	
	  	},
	  	data () {
		    return {
		      	movies:[]
		    }
	  	},
	  	computed: {
            ...mapState({ 
               state: state => state.common 
            })
        },
	  	methods:{
	  		...mapActions({
                'loadingInit':'loadingInit'
            }),
            getMovieData() {
            	this.$http.getJson('/subject_collection').then((res) => {
                    if (res.status == 200 ) {
                        this.loadingInit(false)
                        this.movies = res.data
                        console.log(res)
                    }
                });
            }
	  	},
	  	mounted:function(){
	  		this.getMovieData()
	  	}
	}
</script>